class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: B = None
        self.s: E = None
        self.o: B = None
        self.v: G = None
        self.x: I = None
        self.p: I = None
        self.r: A = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.x: G = None
        self.r: G = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: C = None
        self.y: B = None
        self.q: D = None
        self.u: A = None
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: H = None
        self.r: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.x: G = None
        self.r: G = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: C = None
        self.y: B = None
        self.q: D = None
        self.u: A = None
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: H = None
        self.r: D = None
        self.txt = txt

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

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