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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: A = None
        self.p: A = None
        self.s: G = None
        self.y: F = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: H = None
        self.p: I = None
        self.q: E = None
        self.x: F = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: A = None
        self.p: A = None
        self.s: G = None
        self.y: F = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: H = None
        self.p: I = None
        self.q: E = None
        self.x: F = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: D = None
        self.txt = txt

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

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