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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: E = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.o: D = None
        self.s: F = None
        self.z: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.x: B = None
        self.v: A = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: B = None
        self.p: F = None
        self.v: C = None
        self.o: B = None
        self.x: C = None
        self.txt = txt

f = A("f")
b = B("b")
d = C("d")
l = D("l")
m = E("m")
k = F("k")
g = G("g")
e = F("e")
h = E("h")
n = A("n")

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: E = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.o: D = None
        self.s: F = None
        self.z: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.x: B = None
        self.v: A = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: B = None
        self.p: F = None
        self.v: C = None
        self.o: B = None
        self.x: C = None
        self.txt = txt

f = A("f")
b = B("b")
d = C("d")
l = D("l")
m = E("m")
k = F("k")
g = G("g")
e = F("e")
h = E("h")
n = A("n")

f.t = e
f.o = e
f.u = l
f.s = l
f.w = k
f.p = b
f.x = d
b.o = l
b.t = m
b.p = k
b.u = e
b.s = d
d.u = l
d.w = m
d.v = f
l.w = d
l.r = d
m.v = l
m.o = l
m.q = h
m.z = h
m.s = k
k.p = m
k.y = l
k.x = b
k.v = f
k.z = g
k.q = g
g.t = k
g.q = b
g.o = b
g.p = e
g.v = d
g.x = d
e.p = h
e.y = l
e.x = b
e.v = f
e.z = g
e.q = g
h.v = l
h.o = l
h.q = m
h.z = m
h.s = k
n.t = e
n.o = e
n.w = e
n.u = l
n.s = l
n.p = b
n.x = d
assert k.p.q.z.s.txt == "k"