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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: F = None
        self.w: I = None
        self.x: I = None
        self.v: F = None
        self.z: G = None
        self.y: I = None
        self.o: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: B = None
        self.o: B = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: I = None
        self.o: C = None
        self.x: D = None
        self.p: H = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: D = None
        self.x: H = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: B = None
        self.x: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: F = None
        self.w: I = None
        self.x: I = None
        self.v: F = None
        self.z: G = None
        self.y: I = None
        self.o: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: B = None
        self.o: B = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: I = None
        self.o: C = None
        self.x: D = None
        self.p: H = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: D = None
        self.x: H = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: B = None
        self.x: F = None
        self.y: D = None
        self.txt = txt

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

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

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