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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: A = None
        self.z: A = None
        self.w: F = None
        self.p: G = None
        self.v: C = None
        self.t: B = None
        self.txt = txt

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

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

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

l = A("l")
i = B("i")
b = C("b")
d = D("d")
j = E("j")
m = F("m")
a = G("a")
k = H("k")
e = H("e")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: A = None
        self.z: A = None
        self.w: F = None
        self.p: G = None
        self.v: C = None
        self.t: B = None
        self.txt = txt

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

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

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

l = A("l")
i = B("i")
b = C("b")
d = D("d")
j = E("j")
m = F("m")
a = G("a")
k = H("k")
e = H("e")

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