class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: C = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: G = None
        self.z: C = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: F = None
        self.p: F = None
        self.s: B = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: E = None
        self.r: F = None
        self.v: G = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: G = None
        self.x: B = None
        self.o: G = None
        self.z: G = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.y: C = None
        self.txt = txt

d = A("d")
f = B("f")
l = C("l")
n = D("n")
c = E("c")
k = F("k")
g = G("g")
a = D("a")
b = E("b")

d.v = g
d.p = l
d.s = a
f.x = k
f.u = g
f.v = g
f.z = l
f.t = c
l.t = a
n.t = g
n.u = k
n.p = k
n.x = k
n.s = f
c.z = b
c.q = b
c.r = k
c.v = g
c.w = l
c.t = d
k.r = c
k.v = g
k.o = g
k.z = g
k.x = f
k.p = f
g.q = l
g.y = l
g.x = a
a.t = g
a.u = k
a.p = k
a.x = k
a.s = f
b.z = c
b.q = c
b.r = k
b.v = g
b.w = l
b.t = d
assert f.u.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: C = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: G = None
        self.z: C = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: F = None
        self.p: F = None
        self.s: B = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: E = None
        self.r: F = None
        self.v: G = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: G = None
        self.x: B = None
        self.o: G = None
        self.z: G = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.y: C = None
        self.txt = txt

d = A("d")
f = B("f")
l = C("l")
n = D("n")
c = E("c")
k = F("k")
g = G("g")
a = D("a")
b = E("b")

d.v = g
d.p = l
d.s = a
f.x = k
f.u = g
f.v = g
f.z = l
f.t = c
l.t = a
n.t = g
n.u = k
n.p = k
n.x = k
n.s = f
c.z = b
c.q = b
c.r = k
c.v = g
c.w = l
c.t = d
k.r = c
k.v = g
k.o = g
k.z = g
k.x = f
k.p = f
g.q = l
g.y = l
g.x = a
a.t = g
a.u = k
a.p = k
a.x = k
a.s = f
b.z = c
b.q = c
b.r = k
b.v = g
b.w = l
b.t = d
assert f.u.x.s.txt == "f"