class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: E = None
        self.x: A = None
        self.o: A = None
        self.z: D = None
        self.p: D = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.q: C = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: E = None
        self.txt = txt

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

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

c.t = h
c.v = b
a.r = m
a.y = j
a.s = h
m.v = n
m.s = b
m.x = c
m.o = c
m.z = d
m.p = d
m.q = d
m.y = f
d.v = a
d.z = h
d.q = m
d.o = n
b.z = d
b.o = g
b.v = g
b.r = j
n.w = m
n.o = m
h.t = c
h.z = b
j.u = n
j.z = h
j.q = h
j.y = m
j.x = c
j.s = c
j.r = a
j.w = a
g.z = d
g.o = b
g.v = b
g.r = j
f.r = m
f.y = j
f.s = h
assert b.v.v.r.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: E = None
        self.x: A = None
        self.o: A = None
        self.z: D = None
        self.p: D = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.q: C = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: E = None
        self.txt = txt

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

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

c.t = h
c.v = b
a.r = m
a.y = j
a.s = h
m.v = n
m.s = b
m.x = c
m.o = c
m.z = d
m.p = d
m.q = d
m.y = f
d.v = a
d.z = h
d.q = m
d.o = n
b.z = d
b.o = g
b.v = g
b.r = j
n.w = m
n.o = m
h.t = c
h.z = b
j.u = n
j.z = h
j.q = h
j.y = m
j.x = c
j.s = c
j.r = a
j.w = a
g.z = d
g.o = b
g.v = b
g.r = j
f.r = m
f.y = j
f.s = h
assert b.v.v.r.r.txt == "a"