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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: H = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: H = None
        self.s: B = None
        self.txt = txt

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

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

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