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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: F = None
        self.z: H = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.x: G = None
        self.q: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: A = None
        self.y: G = None
        self.q: D = None
        self.w: E = None
        self.x: D = None
        self.r: E = None
        self.o: D = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: E = None
        self.t: E = None
        self.y: H = None
        self.s: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: F = None
        self.z: H = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.x: G = None
        self.q: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: A = None
        self.y: G = None
        self.q: D = None
        self.w: E = None
        self.x: D = None
        self.r: E = None
        self.o: D = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: E = None
        self.t: E = None
        self.y: H = None
        self.s: H = None
        self.txt = txt

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

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