class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: G = None
        self.q: G = None
        self.w: E = None
        self.p: D = None
        self.o: D = None
        self.s: F = None
        self.r: D = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: H = None
        self.y: F = None
        self.u: G = None
        self.p: B = None
        self.z: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: H = None
        self.u: C = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: C = None
        self.q: B = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: H = None
        self.y: F = None
        self.u: G = None
        self.p: B = None
        self.z: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: H = None
        self.u: C = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: C = None
        self.q: B = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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