class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: G = None
        self.t: I = None
        self.o: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: E = None
        self.p: E = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: H = None
        self.y: E = None
        self.v: H = None
        self.u: A = None
        self.x: B = None
        self.t: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: E = None
        self.u: C = None
        self.v: H = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: E = None
        self.p: E = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: H = None
        self.y: E = None
        self.v: H = None
        self.u: A = None
        self.x: B = None
        self.t: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: E = None
        self.u: C = None
        self.v: H = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

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

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