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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: F = None
        self.v: H = None
        self.o: B = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: C = None
        self.x: A = None
        self.q: G = None
        self.p: D = None
        self.s: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: B = None
        self.p: B = None
        self.x: A = None
        self.z: C = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: G = None
        self.u: H = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: F = None
        self.v: H = None
        self.o: B = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: C = None
        self.x: A = None
        self.q: G = None
        self.p: D = None
        self.s: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: B = None
        self.p: B = None
        self.x: A = None
        self.z: C = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: G = None
        self.u: H = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

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