class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: H = None
        self.q: G = None
        self.x: H = None
        self.p: A = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: A = None
        self.s: D = None
        self.w: G = None
        self.o: J = None
        self.q: G = None
        self.v: B = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: A = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: H = None
        self.q: G = None
        self.x: H = None
        self.p: A = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: A = None
        self.s: D = None
        self.w: G = None
        self.o: J = None
        self.q: G = None
        self.v: B = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: A = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: A = None
        self.txt = txt

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

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