class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: H = None
        self.u: C = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: I = None
        self.z: I = None
        self.y: I = None
        self.w: E = None
        self.q: H = None
        self.x: A = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: H = None
        self.u: C = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: I = None
        self.z: I = None
        self.y: I = None
        self.w: E = None
        self.q: H = None
        self.x: A = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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