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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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