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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: B = None
        self.u: C = None
        self.v: G = None
        self.q: A = None
        self.r: H = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: H = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: H = None
        self.t: E = None
        self.z: B = None
        self.q: I = None
        self.o: B = None
        self.r: G = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: D = None
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: B = None
        self.u: C = None
        self.v: G = None
        self.q: A = None
        self.r: H = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: H = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: H = None
        self.t: E = None
        self.z: B = None
        self.q: I = None
        self.o: B = None
        self.r: G = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: D = None
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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