class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: F = None
        self.y: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: G = None
        self.q: G = None
        self.x: B = None
        self.u: E = None
        self.txt = txt

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

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

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

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

g = A("g")
j = B("j")
h = C("h")
a = D("a")
f = E("f")
e = F("e")
c = G("c")
d = G("d")
n = E("n")
b = D("b")

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: G = None
        self.q: G = None
        self.x: B = None
        self.u: E = None
        self.txt = txt

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

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

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

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

g = A("g")
j = B("j")
h = C("h")
a = D("a")
f = E("f")
e = F("e")
c = G("c")
d = G("d")
n = E("n")
b = D("b")

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