class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: G = None
        self.u: C = None
        self.t: E = None
        self.w: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: F = None
        self.t: D = None
        self.z: E = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: A = None
        self.z: D = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: A = None
        self.p: C = None
        self.q: A = None
        self.v: F = None
        self.x: C = None
        self.z: B = None
        self.txt = txt

k = A("k")
f = B("f")
j = C("j")
l = D("l")
h = E("h")
n = F("n")
c = G("c")
b = A("b")
d = B("d")
e = E("e")

k.z = n
k.x = h
f.u = e
f.t = c
f.x = c
f.v = n
f.s = n
f.o = l
f.p = h
j.u = k
l.o = d
l.y = c
l.u = j
l.t = h
l.w = n
l.v = n
h.w = l
h.t = l
h.x = n
h.z = e
h.u = b
n.o = j
n.t = j
n.x = b
n.z = l
c.y = n
c.v = n
c.s = b
c.p = j
c.x = j
c.q = k
c.z = f
b.z = n
b.x = e
d.u = e
d.t = c
d.x = c
d.v = n
d.s = n
d.o = l
d.p = h
e.w = l
e.t = l
e.x = n
e.z = h
e.u = b
assert d.s.z.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: G = None
        self.u: C = None
        self.t: E = None
        self.w: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: F = None
        self.t: D = None
        self.z: E = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: A = None
        self.z: D = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: A = None
        self.p: C = None
        self.q: A = None
        self.v: F = None
        self.x: C = None
        self.z: B = None
        self.txt = txt

k = A("k")
f = B("f")
j = C("j")
l = D("l")
h = E("h")
n = F("n")
c = G("c")
b = A("b")
d = B("d")
e = E("e")

k.z = n
k.x = h
f.u = e
f.t = c
f.x = c
f.v = n
f.s = n
f.o = l
f.p = h
j.u = k
l.o = d
l.y = c
l.u = j
l.t = h
l.w = n
l.v = n
h.w = l
h.t = l
h.x = n
h.z = e
h.u = b
n.o = j
n.t = j
n.x = b
n.z = l
c.y = n
c.v = n
c.s = b
c.p = j
c.x = j
c.q = k
c.z = f
b.z = n
b.x = e
d.u = e
d.t = c
d.x = c
d.v = n
d.s = n
d.o = l
d.p = h
e.w = l
e.t = l
e.x = n
e.z = h
e.u = b
assert d.s.z.u.u.txt == "k"