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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: G = None
        self.p: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: C = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: G = None
        self.p: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: C = None
        self.y: G = None
        self.txt = txt

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

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

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