class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: B = None
        self.t: A = None
        self.s: A = None
        self.x: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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