class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: F = None
        self.r: C = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

g.w = l
g.z = i
g.r = j
g.q = h
n.u = l
n.q = i
n.v = i
j.q = i
e.u = j
h.r = n
h.o = n
i.y = e
l.r = n
l.o = n
assert n.u.o.u.o.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: F = None
        self.r: C = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

g.w = l
g.z = i
g.r = j
g.q = h
n.u = l
n.q = i
n.v = i
j.q = i
e.u = j
h.r = n
h.o = n
i.y = e
l.r = n
l.o = n
assert n.u.o.u.o.v.y.txt == "e"