class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.z: E = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: D = None
        self.y: C = None
        self.z: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: D = None
        self.q: D = None
        self.y: D = None
        self.t: B = None
        self.txt = txt

m = A("m")
h = B("h")
e = C("e")
c = D("c")
k = E("k")
n = F("n")
j = A("j")

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: D = None
        self.y: C = None
        self.z: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: D = None
        self.q: D = None
        self.y: D = None
        self.t: B = None
        self.txt = txt

m = A("m")
h = B("h")
e = C("e")
c = D("c")
k = E("k")
n = F("n")
j = A("j")

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