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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.r: A = None
        self.x: G = None
        self.z: A = None
        self.s: H = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: D = None
        self.x: H = None
        self.q: D = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: H = None
        self.q: H = None
        self.v: D = None
        self.s: H = None
        self.r: H = None
        self.x: A = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: C = None
        self.s: I = None
        self.o: G = None
        self.z: I = None
        self.r: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.r: A = None
        self.x: G = None
        self.z: A = None
        self.s: H = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: D = None
        self.x: H = None
        self.q: D = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: H = None
        self.q: H = None
        self.v: D = None
        self.s: H = None
        self.r: H = None
        self.x: A = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: C = None
        self.s: I = None
        self.o: G = None
        self.z: I = None
        self.r: D = None
        self.txt = txt

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

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

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