class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: C = None
        self.p: B = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: C = None
        self.p: B = None
        self.o: F = None
        self.txt = txt

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

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

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

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