class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: G = None
        self.r: D = None
        self.p: C = None
        self.u: I = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: H = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: C = None
        self.t: I = None
        self.w: E = None
        self.x: B = None
        self.v: D = None
        self.s: B = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: H = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: C = None
        self.t: I = None
        self.w: E = None
        self.x: B = None
        self.v: D = None
        self.s: B = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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