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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: G = None
        self.z: D = None
        self.p: F = None
        self.t: F = None
        self.s: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: B = None
        self.v: F = None
        self.x: D = None
        self.w: E = None
        self.y: B = None
        self.o: E = None
        self.txt = txt

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

k.q = n
k.o = n
k.t = j
k.p = f
k.s = h
i.o = j
c.r = m
c.p = m
c.t = m
c.x = l
c.z = n
c.s = j
n.q = l
n.s = c
j.w = n
j.p = n
j.o = c
f.t = j
f.u = j
f.v = n
f.o = c
f.p = l
f.w = m
l.t = i
l.q = i
l.y = i
l.v = m
l.x = n
l.w = j
l.o = j
m.t = j
m.u = j
m.v = n
m.o = h
m.p = l
m.w = f
h.r = f
h.t = f
h.x = l
h.z = n
h.p = m
h.s = j
assert f.v.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: E = None
        self.p: F = None
        self.s: C = None
        self.o: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: G = None
        self.z: D = None
        self.p: F = None
        self.t: F = None
        self.s: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: B = None
        self.v: F = None
        self.x: D = None
        self.w: E = None
        self.y: B = None
        self.o: E = None
        self.txt = txt

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

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