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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: B = None
        self.s: B = None
        self.r: I = None
        self.t: I = None
        self.q: E = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: D = None
        self.v: A = None
        self.s: A = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: B = None
        self.s: B = None
        self.r: I = None
        self.t: I = None
        self.q: E = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: D = None
        self.v: A = None
        self.s: A = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: A = None
        self.txt = txt

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

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

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