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

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: H = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.t: E = None
        self.z: E = None
        self.p: C = None
        self.u: H = None
        self.txt = txt

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

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

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

f.u = k
f.p = k
f.v = h
d.w = i
d.v = k
d.r = m
d.z = n
k.r = d
k.u = n
k.v = n
k.s = f
m.r = i
m.s = i
m.y = l
c.v = h
h.s = m
h.w = m
h.t = c
h.z = c
h.p = k
h.u = i
l.s = k
l.p = c
l.r = m
l.w = n
i.s = c
i.z = d
n.s = m
n.w = m
n.t = c
n.z = c
n.p = k
n.u = i
assert c.v.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: F = None
        self.p: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: H = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.t: E = None
        self.z: E = None
        self.p: C = None
        self.u: H = None
        self.txt = txt

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

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

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

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