class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: I = None
        self.o: C = None
        self.u: B = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: G = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: H = None
        self.v: I = None
        self.u: A = None
        self.x: G = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.p: I = None
        self.y: C = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: I = None
        self.s: D = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: G = None
        self.z: C = None
        self.u: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: G = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: H = None
        self.v: I = None
        self.u: A = None
        self.x: G = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.p: I = None
        self.y: C = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: I = None
        self.s: D = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: G = None
        self.z: C = None
        self.u: H = None
        self.txt = txt

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

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