class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: I = None
        self.v: J = None
        self.x: F = None
        self.o: H = None
        self.y: F = None
        self.p: E = None
        self.u: D = None
        self.t: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: B = None
        self.z: H = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: C = None
        self.u: D = None
        self.v: B = None
        self.q: H = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: E = None
        self.w: B = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: F = None
        self.x: E = None
        self.o: G = None
        self.txt = txt

d = A("d")
k = B("k")
c = C("c")
g = D("g")
h = E("h")
e = F("e")
b = G("b")
f = H("f")
n = I("n")
i = J("i")

d.s = e
d.x = e
d.y = e
d.q = n
d.v = i
d.o = f
d.t = f
d.p = h
d.u = g
k.t = e
k.q = h
k.u = h
k.s = h
k.v = d
c.w = k
c.u = b
c.t = e
g.t = h
g.v = c
h.r = f
h.z = f
h.t = k
h.o = d
e.y = d
e.o = c
e.u = g
e.v = k
e.q = f
e.r = b
b.r = k
b.w = k
b.z = h
b.q = f
f.v = h
f.z = h
f.x = b
n.y = d
n.z = d
n.r = d
n.v = i
n.w = k
n.o = h
n.t = f
n.s = b
i.q = d
i.y = e
i.x = h
i.o = b
assert b.z.t.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: I = None
        self.v: J = None
        self.x: F = None
        self.o: H = None
        self.y: F = None
        self.p: E = None
        self.u: D = None
        self.t: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: B = None
        self.z: H = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: C = None
        self.u: D = None
        self.v: B = None
        self.q: H = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: E = None
        self.w: B = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: F = None
        self.x: E = None
        self.o: G = None
        self.txt = txt

d = A("d")
k = B("k")
c = C("c")
g = D("g")
h = E("h")
e = F("e")
b = G("b")
f = H("f")
n = I("n")
i = J("i")

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