class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: F = None
        self.x: E = None
        self.v: A = None
        self.txt = txt

i = A("i")
n = B("n")
d = C("d")
c = D("c")
e = E("e")
k = F("k")
g = C("g")
h = F("h")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: F = None
        self.x: E = None
        self.v: A = None
        self.txt = txt

i = A("i")
n = B("n")
d = C("d")
c = D("c")
e = E("e")
k = F("k")
g = C("g")
h = F("h")

i.w = k
i.y = n
n.s = d
n.v = i
n.w = c
n.z = h
n.y = e
d.u = g
d.q = g
d.p = n
d.s = c
d.t = k
c.r = i
c.z = i
c.u = e
c.t = e
c.o = d
c.p = n
e.p = i
k.r = h
k.y = h
k.x = e
k.v = i
g.u = d
g.q = d
g.p = n
g.s = c
g.t = k
h.r = k
h.y = k
h.x = e
h.v = i
assert k.x.p.w.v.y.txt == "n"