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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: F = None
        self.p: F = None
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: E = None
        self.w: B = None
        self.r: G = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: D = None
        self.z: H = None
        self.t: E = None
        self.q: C = None
        self.txt = txt

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

b = A("b")
a = B("a")
k = C("k")
j = D("j")
g = E("g")
d = F("d")
m = G("m")
c = H("c")
e = C("e")

b.x = j
b.v = m
b.w = d
b.o = e
b.q = g
a.y = g
a.v = d
a.p = d
a.w = m
k.r = a
k.q = b
k.v = c
j.s = d
g.x = c
g.y = d
d.p = e
d.u = g
d.w = a
d.r = m
d.o = c
m.s = g
m.t = g
m.w = j
m.z = c
m.q = k
c.t = b
c.o = e
e.r = a
e.q = b
e.v = c
assert d.u.x.o.q.o.q.o.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: G = None
        self.w: F = None
        self.o: C = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: F = None
        self.p: F = None
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: E = None
        self.w: B = None
        self.r: G = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: D = None
        self.z: H = None
        self.t: E = None
        self.q: C = None
        self.txt = txt

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

b = A("b")
a = B("a")
k = C("k")
j = D("j")
g = E("g")
d = F("d")
m = G("m")
c = H("c")
e = C("e")

b.x = j
b.v = m
b.w = d
b.o = e
b.q = g
a.y = g
a.v = d
a.p = d
a.w = m
k.r = a
k.q = b
k.v = c
j.s = d
g.x = c
g.y = d
d.p = e
d.u = g
d.w = a
d.r = m
d.o = c
m.s = g
m.t = g
m.w = j
m.z = c
m.q = k
c.t = b
c.o = e
e.r = a
e.q = b
e.v = c
assert d.u.x.o.q.o.q.o.r.txt == "a"