class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: F = None
        self.t: G = None
        self.x: I = None
        self.v: G = None
        self.o: D = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: A = None
        self.s: J = None
        self.r: G = None
        self.t: F = None
        self.p: J = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.u: D = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: D = None
        self.q: H = None
        self.o: H = None
        self.p: F = None
        self.v: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: A = None
        self.s: J = None
        self.r: G = None
        self.t: F = None
        self.p: J = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.u: D = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: D = None
        self.q: H = None
        self.o: H = None
        self.p: F = None
        self.v: F = None
        self.txt = txt

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

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