class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: C = None
        self.v: E = None
        self.x: B = None
        self.p: H = None
        self.q: B = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: C = None
        self.o: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.u: D = None
        self.q: F = None
        self.p: E = None
        self.s: B = None
        self.y: F = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: F = None
        self.w: G = None
        self.p: F = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: C = None
        self.v: E = None
        self.x: B = None
        self.p: H = None
        self.q: B = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: C = None
        self.o: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.u: D = None
        self.q: F = None
        self.p: E = None
        self.s: B = None
        self.y: F = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: F = None
        self.w: G = None
        self.p: F = None
        self.v: B = None
        self.txt = txt

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

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