class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.u: F = None
        self.s: I = None
        self.o: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: C = None
        self.s: I = None
        self.x: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: H = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.u: F = None
        self.s: I = None
        self.o: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: C = None
        self.s: I = None
        self.x: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: H = None
        self.x: A = None
        self.txt = txt

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

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