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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: H = None
        self.y: A = None
        self.q: F = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: A = None
        self.o: A = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: H = None
        self.y: A = None
        self.q: F = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: A = None
        self.o: A = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

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