class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: F = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: B = None
        self.w: E = None
        self.u: D = None
        self.p: A = None
        self.t: E = None
        self.z: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: B = None
        self.z: E = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: E = None
        self.q: E = None
        self.v: F = None
        self.z: C = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: B = None
        self.w: E = None
        self.u: D = None
        self.p: A = None
        self.t: E = None
        self.z: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: B = None
        self.z: E = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: E = None
        self.q: E = None
        self.v: F = None
        self.z: C = None
        self.u: D = None
        self.txt = txt

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

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