class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: C = None
        self.o: F = None
        self.p: F = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: B = None
        self.q: B = None
        self.z: D = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: B = None
        self.q: B = None
        self.z: D = None
        self.v: D = None
        self.txt = txt

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

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