class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: D = None
        self.p: D = None
        self.v: C = None
        self.z: D = None
        self.s: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

a = A("a")
h = B("h")
l = C("l")
m = D("m")
b = E("b")
d = F("d")
k = D("k")
c = C("c")
g = F("g")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

a = A("a")
h = B("h")
l = C("l")
m = D("m")
b = E("b")
d = F("d")
k = D("k")
c = C("c")
g = F("g")

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