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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: E = None
        self.y: D = None
        self.s: E = None
        self.w: D = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.z: B = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: C = None
        self.t: C = None
        self.q: B = None
        self.o: D = None
        self.s: B = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

c = A("c")
g = B("g")
h = C("h")
l = D("l")
b = E("b")
k = F("k")
i = G("i")
d = H("d")
j = I("j")

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: E = None
        self.y: D = None
        self.s: E = None
        self.w: D = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.z: B = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: C = None
        self.t: C = None
        self.q: B = None
        self.o: D = None
        self.s: B = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

c = A("c")
g = B("g")
h = C("h")
l = D("l")
b = E("b")
k = F("k")
i = G("i")
d = H("d")
j = I("j")

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