class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: C = None
        self.y: G = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: H = None
        self.t: E = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: F = None
        self.p: F = None
        self.v: G = None
        self.r: B = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: H = None
        self.t: E = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: F = None
        self.p: F = None
        self.v: G = None
        self.r: B = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

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