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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: D = None
        self.s: F = None
        self.p: D = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: F = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: B = None
        self.v: A = None
        self.r: H = None
        self.x: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: G = None
        self.r: D = None
        self.u: G = None
        self.q: C = None
        self.y: F = None
        self.txt = txt

i = A("i")
j = B("j")
g = C("g")
a = D("a")
k = E("k")
l = F("l")
n = G("n")
f = H("f")
c = A("c")

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: D = None
        self.s: F = None
        self.p: D = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: F = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: B = None
        self.v: A = None
        self.r: H = None
        self.x: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: G = None
        self.r: D = None
        self.u: G = None
        self.q: C = None
        self.y: F = None
        self.txt = txt

i = A("i")
j = B("j")
g = C("g")
a = D("a")
k = E("k")
l = F("l")
n = G("n")
f = H("f")
c = A("c")

i.p = l
i.v = l
i.t = l
i.q = f
i.y = f
i.r = n
i.w = c
j.z = n
j.w = a
j.p = a
j.s = l
j.q = k
g.u = k
g.y = k
g.o = k
g.r = j
g.p = j
g.s = a
g.v = f
a.u = g
a.r = g
k.u = f
k.v = l
k.p = l
l.o = a
l.q = j
l.v = i
l.x = i
l.r = f
n.t = l
n.z = l
n.u = l
n.s = i
n.v = f
n.x = c
n.q = a
f.o = g
f.q = g
f.x = n
f.u = n
f.r = a
f.y = l
c.p = l
c.v = l
c.t = l
c.q = f
c.y = f
c.r = n
c.w = i
assert k.v.r.o.v.y.o.u.v.txt == "f"