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

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: C = None
        self.u: B = None
        self.v: H = None
        self.t: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

e.v = j
e.q = c
e.r = m
m.o = c
m.p = c
m.t = h
b.v = h
j.r = h
j.w = b
j.u = m
j.v = c
j.t = c
a.o = k
a.q = b
a.u = h
a.v = j
f.o = a
f.p = a
h.u = m
c.x = m
c.p = b
c.s = k
c.t = f
c.r = h
k.v = j
k.q = c
k.r = m
assert c.p.v.u.o.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.r: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: C = None
        self.u: B = None
        self.v: H = None
        self.t: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

e.v = j
e.q = c
e.r = m
m.o = c
m.p = c
m.t = h
b.v = h
j.r = h
j.w = b
j.u = m
j.v = c
j.t = c
a.o = k
a.q = b
a.u = h
a.v = j
f.o = a
f.p = a
h.u = m
c.x = m
c.p = b
c.s = k
c.t = f
c.r = h
k.v = j
k.q = c
k.r = m
assert c.p.v.u.o.r.txt == "h"