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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.v: C = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: C = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: F = None
        self.s: F = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.v: C = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: C = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: F = None
        self.s: F = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

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

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

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