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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: A = None
        self.y: B = None
        self.p: H = None
        self.q: C = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: A = None
        self.y: B = None
        self.p: H = None
        self.q: C = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

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

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

l.t = i
l.y = i
i.z = h
i.p = h
i.v = l
i.t = m
i.o = b
m.y = b
m.z = i
m.x = i
m.w = e
d.q = m
j.q = b
j.v = e
j.x = k
k.x = b
k.s = l
k.y = i
k.r = i
k.p = h
k.q = e
k.v = d
b.v = j
h.o = i
e.y = b
e.z = i
e.x = i
e.w = m
assert e.y.v.q.v.x.p.o.o.txt == "b"