class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: G = None
        self.u: G = None
        self.y: E = None
        self.v: F = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

a = A("a")
e = B("e")
j = C("j")
h = D("h")
k = E("k")
c = F("c")
d = G("d")
l = F("l")
m = G("m")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

a = A("a")
e = B("e")
j = C("j")
h = D("h")
k = E("k")
c = F("c")
d = G("d")
l = F("l")
m = G("m")

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