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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

j = A("j")
l = B("l")
f = C("f")
n = D("n")
i = E("i")
g = F("g")
c = G("c")
b = H("b")
d = A("d")
m = H("m")

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

j = A("j")
l = B("l")
f = C("f")
n = D("n")
i = E("i")
g = F("g")
c = G("c")
b = H("b")
d = A("d")
m = H("m")

j.v = c
j.y = c
j.r = c
j.t = f
j.o = f
j.s = m
l.z = f
f.v = n
f.z = m
f.t = i
n.x = l
i.w = f
i.y = c
i.s = c
i.p = c
g.q = i
g.z = i
g.v = f
g.p = f
g.t = d
g.w = d
g.r = c
c.z = m
b.r = g
b.w = n
b.t = c
d.v = c
d.y = c
d.r = c
d.t = f
d.o = f
d.s = b
m.r = g
m.w = n
m.t = c
assert j.t.t.w.v.x.z.t.txt == "i"