class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: I = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: F = None
        self.x: B = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: F = None
        self.q: A = None
        self.z: I = None
        self.x: I = None
        self.r: A = None
        self.y: G = None
        self.o: G = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: D = None
        self.u: C = None
        self.q: F = None
        self.o: B = None
        self.w: B = None
        self.t: G = None
        self.r: B = None
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: F = None
        self.x: B = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: F = None
        self.q: A = None
        self.z: I = None
        self.x: I = None
        self.r: A = None
        self.y: G = None
        self.o: G = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: D = None
        self.u: C = None
        self.q: F = None
        self.o: B = None
        self.w: B = None
        self.t: G = None
        self.r: B = None
        self.v: E = None
        self.txt = txt

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

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