class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: I = None
        self.q: C = None
        self.x: D = None
        self.w: H = None
        self.s: B = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: C = None
        self.w: H = None
        self.t: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: G = None
        self.t: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: F = None
        self.x: A = None
        self.r: H = None
        self.o: G = None
        self.q: E = None
        self.w: F = None
        self.v: F = None
        self.z: B = None
        self.txt = txt

d = A("d")
f = B("f")
g = C("g")
a = D("a")
n = E("n")
c = F("c")
h = G("h")
l = H("l")
j = I("j")

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: C = None
        self.w: H = None
        self.t: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: G = None
        self.t: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: F = None
        self.x: A = None
        self.r: H = None
        self.o: G = None
        self.q: E = None
        self.w: F = None
        self.v: F = None
        self.z: B = None
        self.txt = txt

d = A("d")
f = B("f")
g = C("g")
a = D("a")
n = E("n")
c = F("c")
h = G("h")
l = H("l")
j = I("j")

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