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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: E = None
        self.r: A = None
        self.q: C = None
        self.u: G = None
        self.p: D = None
        self.w: H = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: C = None
        self.w: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: E = None
        self.u: B = None
        self.v: E = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: F = None
        self.t: C = None
        self.o: C = None
        self.z: H = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: E = None
        self.r: A = None
        self.q: C = None
        self.u: G = None
        self.p: D = None
        self.w: H = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: C = None
        self.w: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: E = None
        self.u: B = None
        self.v: E = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: F = None
        self.t: C = None
        self.o: C = None
        self.z: H = None
        self.w: B = None
        self.txt = txt

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

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

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