class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.w: E = None
        self.v: C = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: B = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: C = None
        self.s: H = None
        self.r: F = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.w: E = None
        self.v: C = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: B = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: C = None
        self.s: H = None
        self.r: F = None
        self.z: G = None
        self.txt = txt

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

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

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

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