class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: G = None
        self.r: H = None
        self.z: G = None
        self.t: G = None
        self.v: E = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: H = None
        self.v: I = None
        self.q: I = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: B = None
        self.v: I = None
        self.y: G = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: F = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: H = None
        self.v: I = None
        self.q: I = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: B = None
        self.v: I = None
        self.y: G = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: F = None
        self.u: C = None
        self.txt = txt

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

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

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