class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.s: B = None
        self.v: C = None
        self.p: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: H = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: H = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: F = None
        self.txt = txt

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

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

i.y = l
i.s = l
i.r = b
i.v = b
i.p = f
l.o = g
l.x = h
l.p = f
l.s = i
l.q = b
b.u = g
b.w = g
b.q = m
g.z = b
g.v = e
g.x = m
e.v = i
e.x = i
e.y = g
e.t = g
e.r = k
e.u = f
f.x = k
f.y = h
f.w = i
f.z = b
m.v = i
m.s = i
m.o = h
h.x = l
h.v = f
k.o = b
k.s = b
k.u = f
k.r = f
k.q = f
k.p = i
k.z = l
k.y = l
k.x = e
assert b.q.o.x.o.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.s: B = None
        self.v: C = None
        self.p: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: H = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: H = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: F = None
        self.txt = txt

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

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

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