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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

n = A("n")
d = B("d")
a = C("a")
l = D("l")
b = E("b")
g = F("g")
j = A("j")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

n = A("n")
d = B("d")
a = C("a")
l = D("l")
b = E("b")
g = F("g")
j = A("j")

n.s = j
n.r = j
n.w = d
n.u = g
n.t = b
d.y = b
d.p = b
d.o = a
d.u = l
d.w = l
d.s = g
a.p = j
a.x = b
a.v = b
a.s = d
a.y = g
l.o = a
l.w = d
l.r = d
l.v = j
l.s = j
b.y = d
g.s = a
g.u = a
g.t = n
j.s = n
j.r = n
j.w = d
j.u = g
j.t = b
assert j.s.t.y.s.t.t.txt == "b"