class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: E = None
        self.t: C = None
        self.r: B = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: E = None
        self.t: C = None
        self.r: B = None
        self.x: E = None
        self.txt = txt

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

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