class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: C = None
        self.x: H = None
        self.y: G = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: C = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: D = None
        self.y: E = None
        self.u: G = None
        self.x: B = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: I = None
        self.r: E = None
        self.o: G = None
        self.t: I = None
        self.x: F = None
        self.q: J = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.y: H = None
        self.w: H = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: J = None
        self.u: D = None
        self.t: B = None
        self.x: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: H = None
        self.o: D = None
        self.s: D = None
        self.q: A = None
        self.x: D = None
        self.w: C = None
        self.txt = txt

l = A("l")
m = B("m")
d = C("d")
e = D("e")
a = E("a")
k = F("k")
h = G("h")
n = H("n")
b = I("b")
f = J("f")

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: C = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: D = None
        self.y: E = None
        self.u: G = None
        self.x: B = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: I = None
        self.r: E = None
        self.o: G = None
        self.t: I = None
        self.x: F = None
        self.q: J = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.y: H = None
        self.w: H = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: J = None
        self.u: D = None
        self.t: B = None
        self.x: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: H = None
        self.o: D = None
        self.s: D = None
        self.q: A = None
        self.x: D = None
        self.w: C = None
        self.txt = txt

l = A("l")
m = B("m")
d = C("d")
e = D("e")
a = E("a")
k = F("k")
h = G("h")
n = H("n")
b = I("b")
f = J("f")

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