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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.x: B = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: E = None
        self.s: B = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.x: B = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: E = None
        self.s: B = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.p: G = None
        self.txt = txt

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

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

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

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