class A:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: E = None
        self.p: F = None
        self.v: C = None
        self.q: G = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: D = None
        self.p: F = None
        self.x: F = None
        self.y: E = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.x: E = None
        self.u: G = None
        self.r: E = None
        self.w: B = None
        self.txt = txt

g = A("g")
j = B("j")
d = C("d")
n = D("n")
k = E("k")
l = F("l")
h = G("h")
b = G("b")
e = D("e")
i = A("i")

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: D = None
        self.p: F = None
        self.x: F = None
        self.y: E = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.x: E = None
        self.u: G = None
        self.r: E = None
        self.w: B = None
        self.txt = txt

g = A("g")
j = B("j")
d = C("d")
n = D("n")
k = E("k")
l = F("l")
h = G("h")
b = G("b")
e = D("e")
i = A("i")

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