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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

d = A("d")
m = B("m")
n = C("n")
l = D("l")
h = E("h")
c = F("c")
j = G("j")
g = C("g")
a = D("a")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

d = A("d")
m = B("m")
n = C("n")
l = D("l")
h = E("h")
c = F("c")
j = G("j")
g = C("g")
a = D("a")

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