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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.x: D = None
        self.r: D = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: F = None
        self.o: B = None
        self.q: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.x: D = None
        self.r: D = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: F = None
        self.o: B = None
        self.q: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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