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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: F = None
        self.w: C = None
        self.r: A = None
        self.y: F = None
        self.u: C = None
        self.s: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: F = None
        self.w: C = None
        self.r: A = None
        self.y: F = None
        self.u: C = None
        self.s: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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