class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: F = None
        self.u: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: A = None
        self.s: E = None
        self.q: E = None
        self.t: D = None
        self.r: E = None
        self.w: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: B = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: F = None
        self.q: A = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

m = A("m")
n = B("n")
f = C("f")
b = D("b")
j = E("j")
i = F("i")
g = G("g")
a = D("a")

m.x = j
m.t = i
m.u = g
n.y = i
n.t = i
n.u = g
f.u = i
f.o = i
f.s = g
b.x = n
b.u = m
b.s = j
b.q = j
b.r = j
b.t = a
b.w = a
j.v = m
j.s = n
j.o = g
i.r = f
i.w = f
i.s = g
i.o = b
g.u = m
g.q = m
g.s = i
g.r = b
g.z = j
a.x = n
a.u = m
a.s = j
a.q = j
a.r = j
a.t = b
a.w = b
assert a.u.x.v.u.u.x.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: F = None
        self.u: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: A = None
        self.s: E = None
        self.q: E = None
        self.t: D = None
        self.r: E = None
        self.w: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: B = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: F = None
        self.q: A = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

m = A("m")
n = B("n")
f = C("f")
b = D("b")
j = E("j")
i = F("i")
g = G("g")
a = D("a")

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