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

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

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

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

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

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

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

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

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

e.o = c
e.v = j
e.q = j
b.u = c
b.o = j
b.p = j
b.w = e
j.r = h
n.p = e
n.s = m
k.z = b
k.p = g
k.s = a
k.u = a
k.w = a
k.y = n
g.z = m
g.o = m
g.v = n
h.r = j
c.o = m
c.s = j
a.r = j
m.z = b
m.p = g
m.s = a
m.u = a
m.w = a
m.y = n
assert e.q.r.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: C = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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