class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: C = None
        self.t: H = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: A = None
        self.o: A = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: C = None
        self.x: F = None
        self.s: F = None
        self.t: I = None
        self.z: I = None
        self.y: A = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: A = None
        self.o: A = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: C = None
        self.x: F = None
        self.s: F = None
        self.t: I = None
        self.z: I = None
        self.y: A = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.r: D = None
        self.txt = txt

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

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