class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.y: D = None
        self.v: E = None
        self.o: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: D = None
        self.q: A = None
        self.u: D = None
        self.t: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: D = None
        self.q: A = None
        self.u: D = None
        self.t: F = None
        self.r: C = None
        self.txt = txt

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

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

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