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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: F = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.y: A = None
        self.u: H = None
        self.w: E = None
        self.t: E = None
        self.v: C = None
        self.txt = txt

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

d.y = a
d.u = f
f.w = g
a.v = c
a.w = c
a.y = c
g.q = k
g.t = j
g.v = e
g.y = e
k.w = f
k.q = j
k.s = c
k.y = g
j.u = a
c.y = j
n.t = a
n.x = f
n.o = b
e.z = k
e.w = k
e.t = k
e.p = n
e.u = n
e.y = b
e.v = a
b.y = a
b.u = f
assert c.y.u.y.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: F = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.y: A = None
        self.u: H = None
        self.w: E = None
        self.t: E = None
        self.v: C = None
        self.txt = txt

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

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