class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: I = None
        self.p: C = None
        self.z: G = None
        self.x: D = None
        self.u: B = None
        self.t: C = None
        self.o: C = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: F = None
        self.x: E = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: D = None
        self.s: E = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: A = None
        self.y: E = None
        self.s: E = None
        self.u: A = None
        self.t: A = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: D = None
        self.o: H = None
        self.t: A = None
        self.w: E = None
        self.s: G = None
        self.r: D = None
        self.q: G = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: F = None
        self.x: E = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: D = None
        self.s: E = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: A = None
        self.y: E = None
        self.s: E = None
        self.u: A = None
        self.t: A = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: D = None
        self.o: H = None
        self.t: A = None
        self.w: E = None
        self.s: G = None
        self.r: D = None
        self.q: G = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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