class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.v: D = None
        self.q: B = None
        self.x: D = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.t: H = None
        self.w: G = None
        self.p: I = None
        self.z: I = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: G = None
        self.z: E = None
        self.v: G = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: I = None
        self.v: B = None
        self.z: H = None
        self.x: I = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: A = None
        self.v: D = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.t: H = None
        self.w: G = None
        self.p: I = None
        self.z: I = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: G = None
        self.z: E = None
        self.v: G = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: I = None
        self.v: B = None
        self.z: H = None
        self.x: I = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: A = None
        self.v: D = None
        self.x: B = None
        self.txt = txt

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

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