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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: G = None
        self.w: I = None
        self.o: D = None
        self.s: B = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: H = None
        self.t: G = None
        self.x: B = None
        self.r: A = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: G = None
        self.w: I = None
        self.o: D = None
        self.s: B = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: H = None
        self.t: G = None
        self.x: B = None
        self.r: A = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: D = None
        self.txt = txt

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

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

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