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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: A = None
        self.v: J = None
        self.s: B = None
        self.u: G = None
        self.q: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: J = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: A = None
        self.r: I = None
        self.x: E = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: C = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.r: F = None
        self.y: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: A = None
        self.v: J = None
        self.s: B = None
        self.u: G = None
        self.q: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: J = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: A = None
        self.r: I = None
        self.x: E = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: C = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.r: F = None
        self.y: A = None
        self.v: D = None
        self.txt = txt

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

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