class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: C = None
        self.q: B = None
        self.z: B = None
        self.p: I = None
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: D = None
        self.r: B = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: E = None
        self.v: C = None
        self.u: E = None
        self.t: F = None
        self.s: G = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: H = None
        self.r: G = None
        self.z: G = None
        self.v: H = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: E = None
        self.y: B = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: E = None
        self.r: D = None
        self.q: H = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: I = None
        self.t: G = None
        self.u: F = None
        self.v: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: D = None
        self.r: B = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: E = None
        self.v: C = None
        self.u: E = None
        self.t: F = None
        self.s: G = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: H = None
        self.r: G = None
        self.z: G = None
        self.v: H = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: E = None
        self.y: B = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: E = None
        self.r: D = None
        self.q: H = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: I = None
        self.t: G = None
        self.u: F = None
        self.v: D = None
        self.z: E = None
        self.txt = txt

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

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

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