class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: E = None
        self.q: H = None
        self.t: D = None
        self.x: H = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: G = None
        self.u: F = None
        self.v: I = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: H = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: D = None
        self.x: H = None
        self.u: G = None
        self.r: G = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: G = None
        self.u: F = None
        self.v: I = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: H = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: D = None
        self.x: H = None
        self.u: G = None
        self.r: G = None
        self.q: D = None
        self.txt = txt

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

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

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

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