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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: I = None
        self.y: A = None
        self.z: I = None
        self.v: D = None
        self.u: E = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.q: I = None
        self.w: D = None
        self.t: B = None
        self.v: H = None
        self.s: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

d = A("d")
i = B("i")
f = C("f")
h = D("h")
l = E("l")
b = F("b")
n = G("n")
m = H("m")
c = I("c")

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: I = None
        self.y: A = None
        self.z: I = None
        self.v: D = None
        self.u: E = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.q: I = None
        self.w: D = None
        self.t: B = None
        self.v: H = None
        self.s: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

d = A("d")
i = B("i")
f = C("f")
h = D("h")
l = E("l")
b = F("b")
n = G("n")
m = H("m")
c = I("c")

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