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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: H = None
        self.w: A = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: A = None
        self.x: B = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: H = None
        self.y: J = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: E = None
        self.s: G = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: D = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: H = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: I = None
        self.t: C = None
        self.o: B = None
        self.p: D = None
        self.r: E = None
        self.z: C = None
        self.q: D = None
        self.txt = txt

g = A("g")
l = B("l")
j = C("j")
b = D("b")
c = E("c")
n = F("n")
d = G("d")
a = H("a")
f = I("f")
i = J("i")

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: H = None
        self.w: A = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: A = None
        self.x: B = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: H = None
        self.y: J = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: E = None
        self.s: G = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: D = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: H = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: I = None
        self.t: C = None
        self.o: B = None
        self.p: D = None
        self.r: E = None
        self.z: C = None
        self.q: D = None
        self.txt = txt

g = A("g")
l = B("l")
j = C("j")
b = D("b")
c = E("c")
n = F("n")
d = G("d")
a = H("a")
f = I("f")
i = J("i")

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