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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

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

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

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

k = A("k")
m = B("m")
d = C("d")
n = D("n")
g = E("g")
a = F("a")
h = F("h")

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

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

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

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

k = A("k")
m = B("m")
d = C("d")
n = D("n")
g = E("g")
a = F("a")
h = F("h")

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