class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: F = None
        self.s: E = None
        self.z: H = None
        self.w: E = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: G = None
        self.u: D = None
        self.r: D = None
        self.w: E = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: I = None
        self.o: A = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: A = None
        self.q: I = None
        self.v: C = None
        self.w: E = None
        self.o: C = None
        self.s: E = None
        self.y: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: G = None
        self.u: D = None
        self.r: D = None
        self.w: E = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: I = None
        self.o: A = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: A = None
        self.q: I = None
        self.v: C = None
        self.w: E = None
        self.o: C = None
        self.s: E = None
        self.y: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: D = None
        self.txt = txt

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

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