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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.q: B = None
        self.u: B = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: C = None
        self.t: D = None
        self.y: C = None
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.q: B = None
        self.u: B = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: C = None
        self.t: D = None
        self.y: C = None
        self.x: D = None
        self.txt = txt

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

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