class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: H = None
        self.q: H = None
        self.u: A = None
        self.v: F = None
        self.w: E = None
        self.s: B = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: A = None
        self.s: E = None
        self.w: B = None
        self.y: H = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: H = None
        self.w: F = None
        self.p: B = None
        self.x: A = None
        self.y: B = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: H = None
        self.q: H = None
        self.u: A = None
        self.v: F = None
        self.w: E = None
        self.s: B = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: A = None
        self.s: E = None
        self.w: B = None
        self.y: H = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: H = None
        self.w: F = None
        self.p: B = None
        self.x: A = None
        self.y: B = None
        self.q: B = None
        self.txt = txt

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

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