class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: D = None
        self.t: C = None
        self.y: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: E = None
        self.t: I = None
        self.y: H = None
        self.u: F = None
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: I = None
        self.x: D = None
        self.s: H = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: E = None
        self.t: I = None
        self.y: H = None
        self.u: F = None
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: I = None
        self.x: D = None
        self.s: H = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: H = None
        self.txt = txt

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

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