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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: C = None
        self.z: E = None
        self.t: G = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: C = None
        self.v: C = None
        self.x: B = None
        self.o: E = None
        self.r: E = None
        self.q: F = None
        self.txt = txt

j = A("j")
m = B("m")
d = C("d")
h = D("h")
n = E("n")
k = F("k")
g = G("g")
b = A("b")
i = C("i")

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: C = None
        self.z: E = None
        self.t: G = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: C = None
        self.v: C = None
        self.x: B = None
        self.o: E = None
        self.r: E = None
        self.q: F = None
        self.txt = txt

j = A("j")
m = B("m")
d = C("d")
h = D("h")
n = E("n")
k = F("k")
g = G("g")
b = A("b")
i = C("i")

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