class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

h = A("h")
c = B("c")
l = C("l")
a = D("a")
f = E("f")
g = F("g")
m = F("m")
e = B("e")
i = B("i")

h.z = f
h.x = a
c.t = a
c.o = h
c.y = l
c.x = l
l.o = i
l.w = i
l.u = f
l.r = f
a.w = m
a.u = f
a.p = f
a.o = l
a.q = l
f.t = a
g.u = e
g.y = f
g.x = c
g.s = a
m.u = c
m.y = f
m.x = i
m.s = a
e.t = a
e.o = h
e.y = l
e.x = l
i.t = a
i.o = h
i.y = l
i.x = l
assert f.t.q.w.t.w.s.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

h = A("h")
c = B("c")
l = C("l")
a = D("a")
f = E("f")
g = F("g")
m = F("m")
e = B("e")
i = B("i")

h.z = f
h.x = a
c.t = a
c.o = h
c.y = l
c.x = l
l.o = i
l.w = i
l.u = f
l.r = f
a.w = m
a.u = f
a.p = f
a.o = l
a.q = l
f.t = a
g.u = e
g.y = f
g.x = c
g.s = a
m.u = c
m.y = f
m.x = i
m.s = a
e.t = a
e.o = h
e.y = l
e.x = l
i.t = a
i.o = h
i.y = l
i.x = l
assert f.t.q.w.t.w.s.u.t.txt == "a"