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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: D = None
        self.p: B = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

c = A("c")
j = B("j")
k = C("k")
h = D("h")
b = E("b")
i = F("i")
e = G("e")
m = E("m")

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: D = None
        self.p: B = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

c = A("c")
j = B("j")
k = C("k")
h = D("h")
b = E("b")
i = F("i")
e = G("e")
m = E("m")

c.t = j
c.o = j
c.z = i
c.r = h
c.y = h
c.p = b
j.y = e
j.s = c
k.r = m
k.o = h
k.p = j
k.t = j
k.v = e
h.t = i
h.u = b
h.q = j
h.r = e
h.z = k
b.s = i
b.q = i
b.y = k
b.t = c
b.z = e
b.v = e
b.u = j
i.t = b
e.w = h
m.s = i
m.q = i
m.y = k
m.t = c
m.z = e
m.v = e
m.u = j
assert j.s.z.t.y.v.w.u.txt == "b"