class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.p: C = None
        self.o: G = None
        self.x: F = None
        self.w: E = None
        self.s: H = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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