class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.w: H = None
        self.u: G = None
        self.o: F = None
        self.s: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.y: B = None
        self.s: A = None
        self.v: B = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: E = None
        self.q: B = None
        self.z: C = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

i = A("i")
f = B("f")
n = C("n")
e = D("e")
m = E("m")
j = F("j")
g = G("g")
l = H("l")

i.t = j
i.o = j
i.z = e
i.w = l
i.s = l
i.u = g
f.z = l
f.s = g
f.q = g
f.r = m
n.y = j
e.p = f
m.r = j
m.o = i
m.s = i
m.y = f
m.v = f
m.u = n
j.o = i
g.r = e
g.y = m
g.q = f
g.z = n
g.u = n
l.v = g
assert g.r.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.w: H = None
        self.u: G = None
        self.o: F = None
        self.s: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.y: B = None
        self.s: A = None
        self.v: B = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: E = None
        self.q: B = None
        self.z: C = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

i = A("i")
f = B("f")
n = C("n")
e = D("e")
m = E("m")
j = F("j")
g = G("g")
l = H("l")

i.t = j
i.o = j
i.z = e
i.w = l
i.s = l
i.u = g
f.z = l
f.s = g
f.q = g
f.r = m
n.y = j
e.p = f
m.r = j
m.o = i
m.s = i
m.y = f
m.v = f
m.u = n
j.o = i
g.r = e
g.y = m
g.q = f
g.z = n
g.u = n
l.v = g
assert g.r.p.s.txt == "g"