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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.u: A = None
        self.w: D = None
        self.x: A = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.u: A = None
        self.w: D = None
        self.x: A = None
        self.t: D = None
        self.txt = txt

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

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

i.o = e
i.w = e
i.v = e
i.p = h
i.s = l
n.o = e
n.w = m
n.s = g
g.t = c
g.p = e
c.w = e
e.p = c
e.v = c
e.w = c
e.t = c
e.u = l
e.x = i
h.z = m
h.w = n
m.o = e
m.w = n
m.s = g
l.o = e
l.w = e
l.v = e
l.p = h
l.s = i
assert e.v.w.v.w.x.txt == "i"