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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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