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

class B:
    def __init__(self, txt: str):
        self.r: C = 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.x: G = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: H = None
        self.t: G = None
        self.w: G = None
        self.u: F = None
        self.x: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: H = None
        self.y: A = None
        self.p: G = None
        self.w: H = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: H = None
        self.z: G = None
        self.u: F = None
        self.r: B = None
        self.q: G = None
        self.y: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = 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.x: G = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: H = None
        self.t: G = None
        self.w: G = None
        self.u: F = None
        self.x: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: H = None
        self.y: A = None
        self.p: G = None
        self.w: H = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: H = None
        self.z: G = None
        self.u: F = None
        self.r: B = None
        self.q: G = None
        self.y: G = None
        self.txt = txt

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

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

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