class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: E = None
        self.t: E = None
        self.x: B = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: F = None
        self.y: F = None
        self.s: E = None
        self.v: C = None
        self.x: F = None
        self.t: G = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.q: C = None
        self.y: A = None
        self.v: B = None
        self.u: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: F = None
        self.y: F = None
        self.s: E = None
        self.v: C = None
        self.x: F = None
        self.t: G = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.q: C = None
        self.y: A = None
        self.v: B = None
        self.u: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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