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

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

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

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

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

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

i = A("i")
f = B("f")
e = C("e")
b = D("b")
g = E("g")
m = F("m")
c = F("c")
j = E("j")
n = B("n")

i.t = m
i.x = n
f.s = c
f.w = e
f.o = g
f.t = i
e.x = m
e.u = b
e.s = c
e.w = i
b.q = c
b.o = f
g.r = i
g.s = m
g.y = n
m.o = e
m.q = b
m.y = c
m.s = j
c.o = e
c.q = b
c.y = m
c.s = j
j.r = i
j.s = m
j.y = f
n.s = c
n.w = e
n.o = g
n.t = i
assert n.w.x.s.s.o.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

i = A("i")
f = B("f")
e = C("e")
b = D("b")
g = E("g")
m = F("m")
c = F("c")
j = E("j")
n = B("n")

i.t = m
i.x = n
f.s = c
f.w = e
f.o = g
f.t = i
e.x = m
e.u = b
e.s = c
e.w = i
b.q = c
b.o = f
g.r = i
g.s = m
g.y = n
m.o = e
m.q = b
m.y = c
m.s = j
c.o = e
c.q = b
c.y = m
c.s = j
j.r = i
j.s = m
j.y = f
n.s = c
n.w = e
n.o = g
n.t = i
assert n.w.x.s.s.o.w.t.txt == "m"