class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: E = None
        self.w: B = None
        self.s: E = None
        self.o: D = None
        self.p: E = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.t: G = None
        self.r: A = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: B = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.t: G = None
        self.r: A = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: B = None
        self.o: E = None
        self.txt = txt

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

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