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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: H = None
        self.r: G = None
        self.x: J = None
        self.q: H = None
        self.p: J = None
        self.w: G = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.y: H = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: I = None
        self.x: B = None
        self.q: F = None
        self.z: G = None
        self.s: J = None
        self.w: I = None
        self.v: G = None
        self.y: I = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: J = None
        self.u: F = None
        self.t: C = None
        self.o: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: H = None
        self.r: G = None
        self.x: J = None
        self.q: H = None
        self.p: J = None
        self.w: G = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.y: H = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: I = None
        self.x: B = None
        self.q: F = None
        self.z: G = None
        self.s: J = None
        self.w: I = None
        self.v: G = None
        self.y: I = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: J = None
        self.u: F = None
        self.t: C = None
        self.o: A = None
        self.txt = txt

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

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

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