class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: G = None
        self.w: D = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: E = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: C = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: F = None
        self.q: G = None
        self.o: F = None
        self.p: B = None
        self.r: D = None
        self.w: A = None
        self.txt = txt

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

g = A("g")
h = B("h")
f = C("f")
k = D("k")
a = E("a")
j = F("j")
b = G("b")
m = F("m")
l = G("l")
i = A("i")

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: G = None
        self.w: D = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: E = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: C = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: F = None
        self.q: G = None
        self.o: F = None
        self.p: B = None
        self.r: D = None
        self.w: A = None
        self.txt = txt

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

g = A("g")
h = B("h")
f = C("f")
k = D("k")
a = E("a")
j = F("j")
b = G("b")
m = F("m")
l = G("l")
i = A("i")

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