class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: D = None
        self.v: B = None
        self.q: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: A = None
        self.u: B = None
        self.x: E = None
        self.y: A = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.v: F = None
        self.s: G = None
        self.txt = txt

a = A("a")
i = B("i")
l = C("l")
b = D("b")
e = E("e")
c = F("c")
n = G("n")
j = H("j")
m = H("m")

a.w = e
a.r = b
a.v = i
a.q = j
i.o = c
l.u = c
l.y = b
l.z = j
b.y = a
b.s = a
b.p = a
b.q = l
e.q = a
e.t = l
c.w = a
n.s = j
n.z = a
n.y = a
n.u = i
n.x = e
n.q = c
j.o = b
j.w = e
j.v = c
j.s = n
m.o = b
m.w = e
m.v = c
m.s = n
assert e.q.q.v.w.r.y.r.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: D = None
        self.v: B = None
        self.q: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: A = None
        self.u: B = None
        self.x: E = None
        self.y: A = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.v: F = None
        self.s: G = None
        self.txt = txt

a = A("a")
i = B("i")
l = C("l")
b = D("b")
e = E("e")
c = F("c")
n = G("n")
j = H("j")
m = H("m")

a.w = e
a.r = b
a.v = i
a.q = j
i.o = c
l.u = c
l.y = b
l.z = j
b.y = a
b.s = a
b.p = a
b.q = l
e.q = a
e.t = l
c.w = a
n.s = j
n.z = a
n.y = a
n.u = i
n.x = e
n.q = c
j.o = b
j.w = e
j.v = c
j.s = n
m.o = b
m.w = e
m.v = c
m.s = n
assert e.q.q.v.w.r.y.r.txt == "b"