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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: A = None
        self.p: B = None
        self.q: G = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: E = None
        self.u: D = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: A = None
        self.p: B = None
        self.q: G = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: E = None
        self.u: D = None
        self.o: A = None
        self.txt = txt

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

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

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

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