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

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.x: E = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: I = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: J = None
        self.w: D = None
        self.v: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: H = None
        self.v: A = None
        self.t: F = None
        self.w: F = None
        self.z: B = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.x: E = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: I = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: J = None
        self.w: D = None
        self.v: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: H = None
        self.v: A = None
        self.t: F = None
        self.w: F = None
        self.z: B = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: F = None
        self.txt = txt

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

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