class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: F = None
        self.w: E = None
        self.o: I = None
        self.r: G = None
        self.p: I = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.x: F = None
        self.v: H = None
        self.r: H = None
        self.y: A = None
        self.z: D = None
        self.w: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: A = None
        self.u: H = None
        self.txt = txt

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

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

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

d.v = g
e.y = l
e.v = b
e.w = a
e.o = c
e.p = c
e.u = c
e.r = k
g.o = b
g.x = b
g.q = i
g.z = i
g.v = l
g.r = l
g.y = d
g.w = d
i.v = b
i.o = b
i.u = c
a.w = l
b.o = g
b.r = c
b.u = e
k.x = e
k.w = d
k.u = l
l.p = k
l.r = k
c.y = b
assert g.v.r.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: F = None
        self.w: E = None
        self.o: I = None
        self.r: G = None
        self.p: I = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.x: F = None
        self.v: H = None
        self.r: H = None
        self.y: A = None
        self.z: D = None
        self.w: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: A = None
        self.u: H = None
        self.txt = txt

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

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

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

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