class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: D = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: F = None
        self.r: D = None
        self.z: B = None
        self.s: B = None
        self.u: D = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: E = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: C = None
        self.txt = txt

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

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

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

c = A("c")
j = B("j")
i = C("i")
a = D("a")
h = E("h")
f = F("f")
m = G("m")
e = B("e")
n = E("n")

c.q = m
c.s = a
c.r = j
j.t = e
j.z = e
j.s = e
j.y = f
j.r = a
j.u = a
j.x = n
i.z = m
i.o = h
i.u = c
a.x = f
a.y = i
h.u = i
h.p = a
h.y = f
f.o = c
f.q = c
f.u = a
f.p = i
f.s = m
f.t = m
f.w = e
m.p = f
m.y = c
m.o = c
m.r = e
m.u = n
m.x = n
m.t = a
e.t = j
e.z = j
e.s = j
e.y = f
e.r = a
e.u = a
e.x = h
n.u = i
n.p = a
n.y = f
assert f.u.y.o.p.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: D = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: F = None
        self.r: D = None
        self.z: B = None
        self.s: B = None
        self.u: D = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: E = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: C = None
        self.txt = txt

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

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

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

c = A("c")
j = B("j")
i = C("i")
a = D("a")
h = E("h")
f = F("f")
m = G("m")
e = B("e")
n = E("n")

c.q = m
c.s = a
c.r = j
j.t = e
j.z = e
j.s = e
j.y = f
j.r = a
j.u = a
j.x = n
i.z = m
i.o = h
i.u = c
a.x = f
a.y = i
h.u = i
h.p = a
h.y = f
f.o = c
f.q = c
f.u = a
f.p = i
f.s = m
f.t = m
f.w = e
m.p = f
m.y = c
m.o = c
m.r = e
m.u = n
m.x = n
m.t = a
e.t = j
e.z = j
e.s = j
e.y = f
e.r = a
e.u = a
e.x = h
n.u = i
n.p = a
n.y = f
assert f.u.y.o.p.x.u.txt == "a"