class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: B = None
        self.w: E = None
        self.o: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: D = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: G = None
        self.t: E = None
        self.u: B = None
        self.o: D = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: A = None
        self.o: A = None
        self.y: C = None
        self.r: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: D = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: G = None
        self.t: E = None
        self.u: B = None
        self.o: D = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: A = None
        self.o: A = None
        self.y: C = None
        self.r: C = None
        self.txt = txt

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

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