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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: G = None
        self.w: B = None
        self.v: B = None
        self.x: F = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.x: B = None
        self.t: F = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: G = None
        self.w: B = None
        self.v: B = None
        self.x: F = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.x: B = None
        self.t: F = None
        self.u: F = None
        self.txt = txt

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

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

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

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