class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.x: G = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: D = None
        self.s: D = None
        self.q: F = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: B = None
        self.o: F = None
        self.x: G = None
        self.q: F = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: E = None
        self.txt = txt

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

g.q = d
g.x = d
g.o = h
g.z = c
h.y = i
h.w = m
h.s = m
h.q = f
h.o = g
b.u = m
b.s = c
m.r = c
m.p = l
c.z = g
c.w = i
c.t = i
c.o = l
c.x = d
c.q = f
l.q = c
l.o = c
l.z = m
d.u = b
d.v = c
e.y = i
e.w = m
e.s = m
e.q = f
e.o = g
i.y = e
i.w = m
i.s = m
i.q = l
i.o = g
f.q = c
f.o = c
f.z = m
assert c.t.q.z.r.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.x: G = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: D = None
        self.s: D = None
        self.q: F = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: B = None
        self.o: F = None
        self.x: G = None
        self.q: F = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: E = None
        self.txt = txt

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

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