class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: F = None
        self.w: C = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: I = None
        self.w: F = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: D = None
        self.r: H = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: G = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: E = None
        self.y: D = None
        self.x: I = None
        self.r: C = None
        self.w: D = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: F = None
        self.w: C = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: I = None
        self.w: F = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: D = None
        self.r: H = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: G = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: E = None
        self.y: D = None
        self.x: I = None
        self.r: C = None
        self.w: D = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

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

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

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