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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: C = None
        self.y: G = None
        self.p: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: C = None
        self.o: C = None
        self.s: I = None
        self.q: I = None
        self.w: F = None
        self.v: F = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: C = None
        self.y: G = None
        self.p: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: C = None
        self.o: C = None
        self.s: I = None
        self.q: I = None
        self.w: F = None
        self.v: F = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

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