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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: A = None
        self.w: G = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: C = None
        self.s: B = None
        self.o: A = None
        self.u: F = None
        self.w: C = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: A = None
        self.p: E = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.t: E = None
        self.p: B = None
        self.q: A = None
        self.txt = txt

f = A("f")
h = B("h")
e = C("e")
i = D("i")
j = E("j")
k = F("k")
n = G("n")
b = H("b")
l = C("l")

f.w = l
f.o = h
f.r = b
h.z = j
e.w = j
e.v = l
i.t = n
i.w = n
i.q = f
i.y = h
j.q = b
j.y = l
j.s = h
j.o = f
j.p = f
j.u = k
j.w = e
k.v = n
k.z = n
k.r = f
k.p = j
n.w = l
b.o = j
b.t = j
b.v = h
b.p = h
b.q = f
l.w = j
l.v = e
assert e.w.u.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: B = None
        self.r: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: A = None
        self.w: G = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: C = None
        self.s: B = None
        self.o: A = None
        self.u: F = None
        self.w: C = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: A = None
        self.p: E = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.t: E = None
        self.p: B = None
        self.q: A = None
        self.txt = txt

f = A("f")
h = B("h")
e = C("e")
i = D("i")
j = E("j")
k = F("k")
n = G("n")
b = H("b")
l = C("l")

f.w = l
f.o = h
f.r = b
h.z = j
e.w = j
e.v = l
i.t = n
i.w = n
i.q = f
i.y = h
j.q = b
j.y = l
j.s = h
j.o = f
j.p = f
j.u = k
j.w = e
k.v = n
k.z = n
k.r = f
k.p = j
n.w = l
b.o = j
b.t = j
b.v = h
b.p = h
b.q = f
l.w = j
l.v = e
assert e.w.u.v.w.txt == "l"