class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: F = None
        self.t: F = None
        self.v: B = None
        self.p: F = None
        self.s: D = None
        self.u: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: E = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: A = None
        self.w: C = None
        self.t: C = None
        self.y: A = None
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: G = None
        self.o: C = None
        self.y: D = None
        self.u: C = None
        self.p: C = None
        self.txt = txt

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

m = A("m")
b = B("b")
a = C("a")
d = D("d")
h = E("h")
g = F("g")
k = G("k")
i = G("i")

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: E = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: A = None
        self.w: C = None
        self.t: C = None
        self.y: A = None
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: G = None
        self.o: C = None
        self.y: D = None
        self.u: C = None
        self.p: C = None
        self.txt = txt

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

m = A("m")
b = B("b")
a = C("a")
d = D("d")
h = E("h")
g = F("g")
k = G("k")
i = G("i")

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