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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.y: I = None
        self.u: D = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.o: A = None
        self.r: D = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: H = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: A = None
        self.r: A = None
        self.x: H = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: H = None
        self.o: B = None
        self.q: I = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: G = None
        self.r: D = None
        self.y: C = None
        self.o: A = None
        self.q: D = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.y: I = None
        self.u: D = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.o: A = None
        self.r: D = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: H = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: A = None
        self.r: A = None
        self.x: H = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: H = None
        self.o: B = None
        self.q: I = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: G = None
        self.r: D = None
        self.y: C = None
        self.o: A = None
        self.q: D = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: G = None
        self.txt = txt

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

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