class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: H = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: B = None
        self.t: G = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: A = None
        self.z: A = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: A = None
        self.r: B = None
        self.q: D = None
        self.x: I = None
        self.v: H = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: B = None
        self.v: A = None
        self.x: A = None
        self.q: F = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: B = None
        self.t: G = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: A = None
        self.z: A = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: A = None
        self.r: B = None
        self.q: D = None
        self.x: I = None
        self.v: H = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: B = None
        self.v: A = None
        self.x: A = None
        self.q: F = None
        self.w: A = None
        self.txt = txt

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

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

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