class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: A = None
        self.o: E = None
        self.z: A = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: A = None
        self.o: E = None
        self.z: A = None
        self.u: B = None
        self.txt = txt

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

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