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

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: C = None
        self.v: E = None
        self.s: F = None
        self.x: G = None
        self.r: E = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: E = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: H = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: G = None
        self.o: F = None
        self.txt = txt

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

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

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

e = A("e")
l = B("l")
b = C("b")
k = D("k")
c = E("c")
m = F("m")
j = G("j")
i = H("i")
g = G("g")
h = B("h")

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

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: C = None
        self.v: E = None
        self.s: F = None
        self.x: G = None
        self.r: E = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: E = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: H = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: G = None
        self.o: F = None
        self.txt = txt

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

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

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

e = A("e")
l = B("l")
b = C("b")
k = D("k")
c = E("c")
m = F("m")
j = G("j")
i = H("i")
g = G("g")
h = B("h")

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