class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: D = None
        self.v: C = None
        self.s: D = None
        self.y: C = None
        self.x: H = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: E = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.r: E = None
        self.w: H = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: H = None
        self.v: B = None
        self.s: F = None
        self.t: H = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: E = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.r: E = None
        self.w: H = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: H = None
        self.v: B = None
        self.s: F = None
        self.t: H = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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